package cn.itcast.crm.service;


import cn.itcast.crm.domain.Customer;
import java.util.List;

import javax.ws.rs.*;


/**
 * 客户操作
 *
 * @author itcast
 *
 */
@Produces({"application/json"})
@Consumes({"application/xml","application/json"})
@Path("/")
public interface CustomerService {
	@Path("/orphan_customers")
	@GET
	List<Customer> findOrphanCustomers();

	@Path("/associated_customers/{fid}")
	@GET
	List<Customer> findAssociatedCustomer(@PathParam("fid") String fixedAreaId);

	@Path("/associationCustomers")
	@PUT
	void associate(
			@QueryParam("customerIds") List<Integer> customerIds,
			@QueryParam("ids") String id,
			@QueryParam("orphanIds") List<Integer> orphanIds
	);

	@Path("/customer_register")
	@POST
	void register(Customer customer);

	@Path("/customer_telephone/{telephone}")
    @GET
	Customer findByPhoneNumber(@PathParam("telephone") String telephone);

	@Path("/updateType/{telephone}")
    @GET
	void updateType(@PathParam("telephone") String telephone);


}
